import request from "@/utils/request"

let envMicro = window.__MICRO_APP_ENVIRONMENT__
//获取所有的应用
// let prefix = import.meta.env.VITE_APP_BASE_API
let prefix = import.meta.env.VITE_APP_YYJC_API
// if (envMicro) {
//   prefix = window.location.origin + '/integration/api'
// }
export const getIframeRoutes = (params = {}) => {
  return request({
    url: prefix + `/sys/sysMenu/getIframeRoutes`,
    method: 'get',
    params: params
  })
}

// 获取用户详细信息
export function getInfo() {
  return request({
    url: prefix + '/getInfo',
    method: 'get',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
    // url: prefix + "/env/getInfo",
    // method: "get"
  });
}

// 获取环境变量
export function envConfig() {
  return request({
    url: prefix + "/env-config",
    method: "get"
  })
}